//
//  ImmediateEvaluationViewCell.m
//  TravelFollowYourHeart
//
//  Created by ENERGY on 2017/12/21.
//  Copyright © 2017年 Lwx. All rights reserved.
//

#import "OrderInformationViewCell.h"
#define border 10

@interface OrderInformationViewCell()
@property (nonatomic, strong)UILabel * orderTitleLab;
@end

@implementation OrderInformationViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.backgroundColor = [UIColor whiteColor];
        self.selectionStyle = UITableViewCellEditingStyleNone;
        
        [self.contentView addSubview:self.orderTitleLab];
        [self.contentView addSubview:self.orderContentLab];
    }return self;
}

- (UILabel *)orderTitleLab{
    if (!_orderTitleLab) {
        _orderTitleLab = [[UILabel alloc] init];
        _orderTitleLab.font = DEF_FontSize_14;
//        _orderTitleLab.backgroundColor = [UIColor yellowColor];
        _orderTitleLab.textAlignment = NSTextAlignmentCenter;
    }return _orderTitleLab;
}

- (UILabel *)orderContentLab{
    if (!_orderContentLab) {
        _orderContentLab = [[UILabel alloc] init];
//        _orderContentLab.text = @"2017-01-01 12:12 字体填充用";
        _orderContentLab.font = DEF_FontSize_14;
//        _orderContentLab.backgroundColor = [UIColor redColor];
    }return _orderContentLab;
}

- (void)layoutSubviews{
    [self superview];
    int titleLabH = 40;
    int titleLabW = 80;
    _orderTitleLab.frame = CGRectMake(border, 0, titleLabW, titleLabH);
    _orderContentLab.frame = CGRectMake(_orderTitleLab.right, _orderContentLab.top, SCREEN_WIDTH - 2 * border - _orderTitleLab.width, _orderTitleLab.height);
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (void)setModel:(NSDictionary *)model{
    _model = model;
    self.orderTitleLab.text = model[@"title"];
//    self.orderContentLab.text = model[@"content"];
}

- (void)setContentModel:(NSDictionary *)contentModel{
    _contentModel = contentModel;
    self.orderContentLab.text = contentModel;
}

@end
